package cn.webestar.scms.user.api.dto.SysDict;

import cn.webestar.scms.commons.api.CreateBody;
import cn.webestar.scms.user.entity.SysDict;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Data
@Schema(description = "SysDictCreateDTO")
public class SysDictCreateDTO extends CreateBody {

    @Schema(description = "父键")
    private String pcode;

    @Schema(description = "键")
    private String code;

    @Schema(description = "值")
    private String val;

    @Schema(description = "名称")
    private String name;

    @Schema(description = "排序")
    private Integer sort;

    @Override
    public SysDict toDO() {
        SysDict o = new SysDict();
        o.setPcode(pcode);
        o.setCode(code);
        o.setVal(val);
        o.setName(name);
        o.setSort(sort);
        return o;
    }

}
